<table>
    <thead>
        <tr>
	   	    <th><g:message code="workflowStep.serialNumber" default="Serial Number" /></th>
	   	    <th><g:message code="workflowStep.name" default="Name" /></th>
	   	    <th><g:message code="workflowStep.assignee" default="Assignee" /></th>
	   	    <th><g:message code="workflowStep.lockRecord" default="Lock Record" /></th>
	   	    <th><g:message code="workflowStep.isBegin" default="Begin?" /></th>
	   	    <th><g:message code="workflowStep.isEnd" default="End?" /></th>
        </tr>
    </thead>
    <tbody>
    <g:each in="${workflowStepInstanceList}" status="i" var="workflowStepInstance">
		<g:set var="rowspan" value="${((workflowStepInstance?.actions?.size()) ?: 0)*2 + 1}"/>
        <tr class="${(i % 2) == 0 ? 'odd' : 'even'}" >
            <td ${(rowspan > 1)?('rowspan="'+rowspan+'"'):('') }>
				<g:link controller="workflowStep" action="show" id="${workflowStepInstance.id}">${fieldValue(bean: workflowStepInstance, field: "serialNumber")}</g:link>
			</td>
            <td>${fieldValue(bean: workflowStepInstance, field: "name")}</td>
            <td>${fieldValue(bean: workflowStepInstance, field: "assignee")}</td>
            <td><g:formatBoolean boolean="${workflowStepInstance.lockRecord}" /></td>
            <td><g:formatBoolean boolean="${workflowStepInstance.isBegin}" /></td>
            <td><g:formatBoolean boolean="${workflowStepInstance.isEnd}" /></td>
        </tr>
		<g:render template="/wf/workflow/step_action_list" model="[workflowActionInstanceList : workflowStepInstance?.actions]" />
    </g:each>
    </tbody>
</table>